Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-int64

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-int64

Support for representing 64-bit integers in JavaScript

  • 0.4.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is node-int64?

The node-int64 npm package is used for handling 64-bit integer values in Node.js. It provides functionality to represent, manipulate, and convert 64-bit integers, which are not natively supported in JavaScript due to its use of IEEE 754 floating-point numbers for all numeric values.

What are node-int64's main functionalities?

Creating 64-bit integers

This feature allows the creation of 64-bit integer instances from various inputs such as number, string, or buffer.

const Int64 = require('node-int64');
const int64 = new Int64('0x1234567890abcdef');

Reading 64-bit integers from buffers

This feature enables reading 64-bit integers directly from buffers, which is useful when dealing with binary data streams.

const Int64 = require('node-int64');
const buffer = Buffer.from('1234567890abcdef', 'hex');
const int64 = new Int64(buffer);

Converting 64-bit integers to strings

This feature allows the conversion of 64-bit integers to their string representation, which can be displayed or stored as text.

const Int64 = require('node-int64');
const int64 = new Int64('0x1234567890abcdef');
const str = int64.toString();

Converting 64-bit integers to native JavaScript numbers

This feature provides the ability to convert 64-bit integers to native JavaScript numbers, with the caveat that precision might be lost for large values.

const Int64 = require('node-int64');
const int64 = new Int64('0x1234567890abcdef');
const num = int64.toNumber();

Other packages similar to node-int64

Keywords

FAQs

Package last updated on 04 Apr 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc